package com.ruoyi.model;

/**
 * sdk返回数据
 */
public class AsrVO {
    
    // 成功0，失败非0
    private String code;
    
    // 消息
    private String message;

    // 识别内容
    private String text = "";
    
    public static AsrVO result(String code, String message, String text){
        AsrVO asrVO = new AsrVO();
        asrVO.setCode(code);
        asrVO.setMessage(message);
        asrVO.setText(text);
        return asrVO;
    }

    public static AsrVO success(String text){
        AsrVO asrVO = new AsrVO();
        asrVO.setCode("0");
        asrVO.setMessage("成功");
        asrVO.setText(text);
        return asrVO;
    }

    public static AsrVO error(String message){
        AsrVO asrVO = new AsrVO();
        asrVO.setCode("1");
        asrVO.setMessage(message);
        return asrVO;
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
